<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "b_course_item_resource_reference".
 *
 * @property string $id
 * @property string $resourse_id 资源id
 * @property string $title
 * @property string $type 资源类型
 * @property string $item_id 章节id
 * @property string $item_top_id 章id（方便查询）
 * @property string $course_id 课程id
 * @property string $is_public yesOrNo.yes 公共
 * @property string $create_by 创建者
 * @property string $update_by 更新者
 * @property string $create_time 创建时间
 * @property string $update_time 更新时间
 * @property int $del_flag 删除标示
 * @property int $experience 经验值
 * @property int $sequence
 */
class BCourseItemResourceReference extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'b_course_item_resource_reference';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id'], 'required'],
            [['create_time', 'update_time'], 'safe'],
            [['del_flag', 'experience', 'sequence'], 'integer'],
            [['id', 'resourse_id', 'item_id', 'item_top_id', 'course_id', 'create_by', 'update_by'], 'string', 'max' => 36],
            [['title'], 'string', 'max' => 255],
            [['type'], 'string', 'max' => 64],
            [['is_public'], 'string', 'max' => 20],
            [['id'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'resourse_id' => 'Resourse ID',
            'title' => 'Title',
            'type' => 'Type',
            'item_id' => 'Item ID',
            'item_top_id' => 'Item Top ID',
            'course_id' => 'Course ID',
            'is_public' => 'Is Public',
            'create_by' => 'Create By',
            'update_by' => 'Update By',
            'create_time' => 'Create Time',
            'update_time' => 'Update Time',
            'del_flag' => 'Del Flag',
            'experience' => 'Experience',
            'sequence' => 'Sequence',
        ];
    }
}
